package com.example.fist.dao;


import com.example.fist.entity.AdminEntity;
import com.example.fist.entity.CodeEntity;
import com.example.fist.personRepository.AdminJpaRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.kafka.KafkaProperties;

import java.util.Date;


public class UserDao {


    @Autowired
    private AdminJpaRepository userRepository;

    public UserDao(AdminJpaRepository userRepository){

        this.userRepository=userRepository;
    }

    public AdminEntity Login(String name, String pass) {

        return this.userRepository.Login(name,pass);

    }
    public AdminEntity getAdmin(String name) {

        return this.userRepository.getAdmin(name);

    }
    public int ChangPass(String pass,int id) {
        System.out.println(pass+"-"+id);
        return this.userRepository.changPass(id,pass);

    }



}
